home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Graphics / convd / Rexx / convert2wpcx.isrx < prev   
Text File  |  2000-05-16  |  2KB  |  87 lines

  1. /* ImageStudio ARexx script **************************************/
  2.  
  3. /* Allow commands to return results */
  4.  
  5. options results
  6.  
  7. ADDRESS IMAGESTUDIO
  8.  
  9. /* On error, goto ERROR:. Comment out this line if you wish to */
  10. /* perform your own error checking. */
  11.  
  12. signal on error
  13.  
  14. /* BEGIN PROGRAM *************************************************/
  15.  
  16. /* Warn the user if they are about to overwrite their current project */
  17.  
  18. /* Choose source files */
  19.  
  20.     Sourcedir='ram:t/temp'
  21.     DestDir=  'ram:t/temp.out'
  22.  
  23.     OPEN Sourcedir
  24.     COLOURS 16
  25.     SAVE FILE DestDir FORMAT '"PCX"' FORCE
  26.  
  27. /* END PROGRAM ***************************************************/
  28.  
  29. exit
  30.  
  31. /* On ERROR */
  32.  
  33. ERROR:
  34.  
  35. /* If we get here, either an error occurred with the command's */
  36. /* execution or there was an error with the command itself. */
  37. /* In the former case, rc2 contains the error message and in */
  38. /* the latter, rc2 contains an error number. SIGL contains */
  39. /* the line number of the command which caused the jump */
  40. /* to ERROR: */
  41.  
  42. if datatype(rc2,'NUMERIC') == 1 then do
  43.     /* See if we can describe the error with a string */
  44.  
  45.     select
  46.         when rc2 == 103 then
  47.             err_string = "ERROR 103, "||,
  48.                 "out of memory at line "||SIGL
  49.         when rc2 == 114 then
  50.             err_string = "ERROR 114, "||,
  51.                 "bad command template at line "||SIGL
  52.         when rc2 == 115 then
  53.             err_string = "ERROR 115, "||,
  54.                 "bad number for /N argument at line "||SIGL
  55.         when rc2 == 116 then
  56.             err_string = "ERROR 116, "||,
  57.                 "required argument missing at line "||SIGL
  58.         when rc2 == 117 then
  59.             err_string = "ERROR 117, "||,
  60.                 "value after keywork missing at line "||SIGL
  61.         when rc2 == 118 then
  62.             err_string = "ERROR 118, "||,
  63.                 "wrong number of arguments at line "||SIGL
  64.         when rc2 == 119 then
  65.             err_string = "ERROR 119, "||,
  66.                 "unmatched quotes at line "||SIGL
  67.         when rc2 == 119 then
  68.             err_string = "ERROR 119, "||,
  69.                 "line too long at line "||SIGL
  70.         when rc2 == 236 then
  71.             err_string = "ERROR 236, "||,
  72.                 "unknown command at line "||SIGL
  73.         otherwise
  74.             err_string = "ERROR "||rc2||", at line "||SIGL
  75.         end
  76.         end
  77. else if rc2 == 'RC2' then do
  78.     err_string = "ERROR in command at line "||SIGL
  79.     end
  80. else do
  81.         err_string = rc2||", line "||SIGL
  82.         end
  83.  
  84. request_message TEXT '"'err_string'"'
  85.  
  86. exit
  87.